:root {
    --primary-color: #00ff9d;
    --secondary-color: #00b4ff;
    --dark-bg: #0a192f;
    --darker-bg: #020c1b;
    --text-color: #e6f1ff;
    --highlight-color: #ff2d75;
}

body {
    font-family: 'Roboto', sans-serif;
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
    background-color: var(--dark-bg);
    color: var(--text-color);
    background-image: 
        radial-gradient(circle at 25% 25%, rgba(0, 180, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 75% 75%, rgba(0, 255, 157, 0.1) 0%, transparent 50%);
}

h1 {
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    color: var(--primary-color);
    text-shadow: 0 0 10px rgba(0, 255, 157, 0.5);
    margin-bottom: 10px;
    letter-spacing: 1px;
}

.container {
    background-color: var(--darker-bg);
    border-radius: 15px;
    padding: 25px;
    margin-top: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(0, 180, 255, 0.2);
    position: relative;
    overflow: hidden;
}

.container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
}

.status-container {
    position: relative;
    margin: 30px 0;
    padding: 20px;
    border-radius: 10px;
    background-color: rgba(0, 25, 47, 0.7);
    border: 1px solid rgba(0, 180, 255, 0.3);
    box-shadow: inset 0 0 15px rgba(0, 180, 255, 0.1);
}

.status {
    font-size: 24px;
    font-weight: bold;
    margin: 0;
    font-family: 'Orbitron', sans-serif;
    position: relative;
    z-index: 2;
}

.status-indicator {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.1;
    border-radius: 8px;
    transition: background-color 0.3s ease;
}

.listening .status-indicator {
    background-color: var(--primary-color);
    animation: pulse 2s infinite;
}

.processing .status-indicator {
    background-color: var(--secondary-color);
    animation: pulse 1.5s infinite;
}

.speaking .status-indicator {
    background-color: var(--highlight-color);
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0% { opacity: 0.1; }
    50% { opacity: 0.3; }
    100% { opacity: 0.1; }
}

#audioWave {
    width: 100%;
    height: 120px;
    margin: 30px 0;
    background-color: rgba(0, 25, 47, 0.7);
    border-radius: 10px;
    border: 1px solid rgba(0, 180, 255, 0.3);
    position: relative;
    overflow: hidden;
}

.waveform {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 20px;
}

.wave-bar {
    width: 6px;
    height: 20px;
    margin: 0 3px;
    background: linear-gradient(to top, var(--primary-color), var(--secondary-color));
    border-radius: 3px;
    animation: wave 1.5s infinite ease-in-out;
    transform-origin: bottom;
}

@keyframes wave {
    0%, 100% { transform: scaleY(0.3); }
    50% { transform: scaleY(1); }
}

.wave-bar:nth-child(1) { animation-delay: 0.1s; }
.wave-bar:nth-child(2) { animation-delay: 0.2s; }
.wave-bar:nth-child(3) { animation-delay: 0.3s; }
.wave-bar:nth-child(4) { animation-delay: 0.4s; }
.wave-bar:nth-child(5) { animation-delay: 0.5s; }
.wave-bar:nth-child(6) { animation-delay: 0.4s; }
.wave-bar:nth-child(7) { animation-delay: 0.3s; }
.wave-bar:nth-child(8) { animation-delay: 0.2s; }
.wave-bar:nth-child(9) { animation-delay: 0.1s; }

.btn-group {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 30px 0;
}

button {
    position: relative;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--darker-bg);
    border: none;
    padding: 12px 30px;
    font-size: 16px;
    font-weight: 500;
    margin: 10px 0;
    cursor: pointer;
    border-radius: 50px;
    font-family: 'Orbitron', sans-serif;
    letter-spacing: 1px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 255, 157, 0.3);
}

button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 255, 157, 0.4);
}

button:active {
    transform: translateY(1px);
}

button:disabled {
    background: #555;
    color: #999;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

button::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: rgba(255, 255, 255, 0.1);
    transform: rotate(45deg);
    transition: all 0.3s ease;
    opacity: 0;
}

button:hover::after {
    opacity: 1;
    top: -20%;
    left: -20%;
}

.conversation-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin: 30px 0;
}

.conversation, .log {
    text-align: left;
    border-radius: 10px;
    background-color: rgba(0, 25, 47, 0.7);
    border: 1px solid rgba(0, 180, 255, 0.3);
    box-shadow: inset 0 0 15px rgba(0, 180, 255, 0.1);
    padding: 20px;
    max-height: 250px;
    overflow-y: auto;
}

.conversation-title, .log-title {
    font-family: 'Orbitron', sans-serif;
    color: var(--primary-color);
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 18px;
    display: flex;
    align-items: center;
}

.conversation-title::before, .log-title::before {
    content: '';
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: var(--primary-color);
    margin-right: 10px;
    box-shadow: 0 0 5px var(--primary-color);
}

.log-title::before {
    background-color: var(--secondary-color);
    box-shadow: 0 0 5px var(--secondary-color);
}

.message {
    margin: 10px 0;
    padding: 12px 15px;
    border-radius: 8px;
    position: relative;
    line-height: 1.5;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.user-message {
    background-color: rgba(0, 180, 255, 0.15);
    border-left: 3px solid var(--secondary-color);
    margin-left: 20px;
}

.ai-message {
    background-color: rgba(0, 255, 157, 0.15);
    border-left: 3px solid var(--primary-color);
    margin-right: 20px;
}

.message-sender {
    font-weight: bold;
    margin-bottom: 5px;
    font-family: 'Orbitron', sans-serif;
    font-size: 14px;
}

.user-message .message-sender {
    color: var(--secondary-color);
}

.ai-message .message-sender {
    color: var(--primary-color);
}

.log-entry {
    margin: 8px 0;
    padding: 8px 0;
    border-bottom: 1px solid rgba(0, 180, 255, 0.1);
    font-size: 13px;
    color: #a8b2d1;
    display: flex;
}

.log-time {
    color: var(--secondary-color);
    margin-right: 10px;
    font-family: 'Orbitron', sans-serif;
    font-size: 12px;
    min-width: 70px;
}

.typing-indicator {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    background-color: rgba(0, 255, 157, 0.1);
    border-radius: 8px;
    margin: 10px 0;
    width: fit-content;
}

.typing-dot {
    width: 8px;
    height: 8px;
    background-color: var(--primary-color);
    border-radius: 50%;
    margin: 0 3px;
    animation: typingAnimation 1.4s infinite ease-in-out;
}

.typing-dot:nth-child(1) { animation-delay: 0s; }
.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingAnimation {
    0%, 60%, 100% { transform: translateY(0); }
    30% { transform: translateY(-5px); }
}

/* 自定义滚动条 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(var(--primary-color), var(--secondary-color));
    border-radius: 4px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    .container {
        padding: 15px;
    }
    
    .btn-group {
        flex-direction: column;
        gap: 10px;
    }
    
    button {
        width: 100%;
    }
}

/* 错误消息样式 */
.error-message {
    color: #ff0033;
    background-color: rgba(255, 200, 200, 0.8);
    padding: 8px 12px;
    border-radius: 4px;
    margin-top: 8px;
    font-weight: bold;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    text-align: center;
    width: 100%;
}

/* iOS音频播放器样式 */
.ios-audio-player {
    margin-top: 10px;
    padding: 10px;
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.ios-hint {
    margin: 0 0 5px 0;
    font-size: 12px;
    color: #666;
} 